import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
  BaseEntity,
  CreateDateColumn,
} from 'typeorm';

@Entity()
export class RoomEntity extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', name: 'roomName' })
  roomName: string;

  @Column({ type: 'varchar', name: 'createUserName' })
  createUserName: string;

  @Column({ type: 'varchar', name: 'createName' })
  createName: string;

  @Column({ type: 'varchar', name: 'createUserID' })
  createUserID: string;

  @Column({ type: 'longtext', name: 'onlineUsers' })
  onlineUsers: string;

  @CreateDateColumn({ type: 'timestamp' })
  createTime: Date;
}
